<div id="article-<?php echo $article->id; ?>" class="article">
  <div class="article-head">
    <h2>
      <a rel="bookmark" title="Permalink for this article"
          href="<?php echo $siteUrl; ?>/article/<?php echo $article->id; ?>">
        <?php echo $article->title; ?>
      </a>
    </h2>

    <div class="article-date">
      <?php echo date($dateFormatLong, $article->posted); ?>
    </div>
  </div>

  <div class="article-body">
    <?php echo $article->getContent(); ?>
  </div>

  <div class="article-foot">
    <div class="article-tags">
      <?php $tagCount = 0; ?>
      <?php foreach($article->tags as $tag): ?>
        <?php $tagCount++; ?>
        <a rel="tag"
            href="<?php echo $siteUrl; ?>/tag/<?php echo urlencode($tag); ?>">
          <?php echo htmlentities($tag); ?></a><?php echo $tagCount < count($article->tags) ? ',' : ''; ?>
      <?php endforeach; ?>
    </div>

    <p>
      <img src="<?php echo $themeUrl; ?>/images/comments.png" alt="" />
      
      <?php if ($article->comment_count == 0): ?>
        <a title="Post a comment"
            href="<?php echo $siteUrl; ?>/article/<?php echo $article->id; ?>#post-comment">
          No comments
        </a>
      <?php else: ?>
        <a title="Post or read comments"
            href="<?php echo $siteUrl; ?>/article/<?php echo $article->id; ?>#comments">
          <?php echo $article->comment_count; ?> comment<?php echo $article->comment_count == 1 ? '' : 's'; ?>
        </a>
      <?php endif; ?>
    </p>
  </div>
</div>
